package com.shopping.mall.core.module.goodsSpecification.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.validation.constraints.NotNull;
import java.sql.Timestamp;

/**
 * GoodsSpecification实体类
 *
 * @author zzy
 * @date 2021-08-14
 */
@Data
@TableName("goods_specification")
public class GoodsSpecification {

    public interface insert {
    }

    public interface update {
    }

    @ApiModelProperty(value = "规格id")
    @TableId(type = IdType.UUID)
    private String id;

    @ApiModelProperty(value = "商品id")
    private String goodsId;

    @ApiModelProperty(value = "规格信息(json)")
    private String specification;

    @ApiModelProperty(value = "库存")
    private Integer stock;

    @ApiModelProperty(value = "价格")
    private Double price;

    @ApiModelProperty(value = "折扣价")
    private Double discountPrice;

    @ApiModelProperty(value = "型号")
    private String type;

    @ApiModelProperty("最大购买量")
    private Integer maxNumber;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp createAt;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp updateAt;


}
